package com.lxb.eduservice.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * service-order服务接口类
 *
 * @author xuebin.li
 * @createTime 2023/1/17 18:19
 */
@FeignClient(value = "service-order", fallback = OrderClientImpl.class)
public interface OrderClient {

    /**
     * 查询某个用户是否购买课程
     *
     * @param courseId
     * @param memberId
     * @return 已购买返回true
     */
    @GetMapping("/eduOrder/order/isBuyCourse/{courseId}/{memberId}")
    public boolean isByCourse(@PathVariable("courseId") String courseId, @PathVariable("memberId") String memberId);
}
